const arr = [1, 2, 0, 3, 4, 5, 0];
const newArr = arr.filter(n => n !== 0);

console.log(newArr);
console.log(arr);
